home *** CD-ROM | disk | FTP | other *** search
- (define (substring-CI<? x y z a b c)
- (string-ci<? (substring x y z) (substring a b c)))
-
- (define (substring-CI=? x y z a b c)
- (string-ci=? (substring x y z) (substring a b c)))
-
- (define (substring<? x y z a b c)
- (string<? (substring x y z) (substring a b c)))
-
- (define (substring=? x y z a b c)
- (string=? (substring x y z) (substring a b c)))
-
- (define (substring-fill! x y z a)
- (while (< y z)
- (string-set! x y a)
- (set! y (1+ y)))
- x)
-
- (define (substring-move-left! x y z a b)
- (while (< y z)
- (string-set! x b (string-ref a y))
- (set! b (1+ b))
- (set! y (1+ y)))
- x)
-
- (define (substring-move-right! x y z a b)
- (while (<= y z)
- (set! z (-1+ z))
- (string-set! x b (string-ref a z))
- (set! b (1+ b)))
- x)
-
- (define (substring-find-next-char-in-set st s e c)
- (define (ch-in-set c l)
- (do ((ptr l (cdr ptr)))
- ((or (null? ptr) (eq? (car ptr) c)) ptr)))
- (if (char? c)
- (set! c (list c))
- (set! c (string->list c)))
- (do ((i s (1+ i)))
- ((or (>= i e) (ch-in-set (string-ref st i) c))
- (if (= i e) nil i))))
-
- (define (substring-find-previous-char-in-set st s e c)
- (define (ch-in-set c l)
- (do ((ptr l (cdr ptr)))
- ((or (null? ptr) (eq? (car ptr) c)) ptr)))
- (if (char? c)
- (set! c (list c))
- (set! c (string->list c)))
- (do ((i (-1+ e) (-1+ i)))
- ((or (< i s) (ch-in-set (string-ref st i) c))
- (if (< i s) nil i))))
-